package com.example.demo.vo;

import com.diboot.core.binding.annotation.*;
import com.example.demo.entity.OrderStock;
import com.example.demo.entity.OrderSku;
import com.diboot.iam.entity.IamUser;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import java.util.List;
import com.example.demo.entity.Storeroom;
import com.example.demo.entity.Shelves;

/**
 * 订单库存 DetailVO定义
 * @author MyName
 * @version 1.0
 * @date 2024-01-26
 * Copyright © MyCompany
 */
@Getter
@Setter
@Accessors(chain = true)
public class OrderStockDetailVO extends OrderStock {

    private static final long serialVersionUID = 6173679932908274899L;

    /**
     * 关联字段 系统用户.真实姓名：IamUser.realname
     */
    @BindField(entity = IamUser.class, field = "realname", condition = "this.create_by=id")
    private String createByName;

    /**
     * 关联字段 系统用户.真实姓名：IamUser.realname
     */
    @BindField(entity = IamUser.class, field = "realname", condition = "this.update_by=id")
    private String updateByName;

    /**
     * 关联对象 ：Shelves
     */
    @BindEntity(entity = Shelves.class, condition = "this.shelves_id=id")
    private Shelves shelves;

    /**
     * 关联字段 库房.名称：Storeroom.name
     */
    @BindField(entity = Storeroom.class, field = "name", condition = "this.storeroom_id=id")
    private String storeroomName;

    /**
     * 关联对象 订单sku：OrderSku
     */
    @BindEntity(entity = OrderSku.class, condition = "this.order_sku_id=id")
    private OrderSku orderSku;

    private List<Long> roomshelves;
}
